package com.legendshop.openportal.sdk.model.request.v4;

import com.legendshop.openportal.sdk.model.BaseRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import static com.legendshop.openportal.sdk.model.constants.ApiPathConstantsV4.CHANGE_MERCHANT_MOBILE_V4;

/**
 * 修改租户登录手机号
 */
@Data
public class ChangeMerchantMobileV4Request extends BaseRequest {

    @ApiModelProperty(value = "旧电话号码", required = true)
    @NotNull(message = "旧电话号码不能为空")
    private String oldPhone;

    @ApiModelProperty(value = "新电话号码", required = true)
    @Length(max = 11, message = "新电话号码不能超过11位")
    @NotBlank(message = "新电话号码不能为空")
    private String newPhone;

    @Override
    public String getApiPath() {
        return CHANGE_MERCHANT_MOBILE_V4;
    }
}
